home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / vc / pro15 / lpctl1.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-03  |  4.0 KB  |  140 lines

  1. /****************************************************************************/
  2. /*******    Function prototypes, DEFINES, and required structures   *********/
  3. /****************************************************************************/
  4. #define    HDFT_ALL_PAGES        (char)1
  5. #define    HDFT_ODD_PAGES        (char)2
  6. #define    HDFT_EVEN_PAGES    (char)4
  7. #define    HEADER_A                (char)0
  8. #define    HEADER_B                (char)1
  9. #define    FOOTER_A                (char)2
  10. #define    FOOTER_B                (char)3
  11.  
  12. #define    LINE_PRINTER        (int)0
  13. #define    COURIER_10            (int)1
  14. #define    COURIER_10_BOLD    (int)2
  15. #define    COURIER_10_ITALIC    (int)3
  16. #define    COURIER_12         (int)4
  17. #define    COURIER_12_BOLD    (int)5
  18. #define    COURIER_12_ITALIC    (int)6
  19. #define    HELVETICA_18PT        (int)7
  20. #define    HELVETICA_24PT        (int)8
  21. #define    ROMAN_10            (int)9
  22. #define    ROMAN_12            (int)10
  23. #define    CENTURY_10            (int)11
  24. #define    ROMAN_20            (int)12
  25. #define    WIN_ARIAL            (int)13
  26. #define    WIN_TIMES_R            (int)14
  27. #define    WIN_ROMAN            (int)15
  28. #define    WIN_COURIER_NEW    (int)16
  29. #define    WIN_LINE_PRINTER    (int)17
  30. #define    WIN_CENTURY            (int)18
  31.  
  32. //    the following defines are for control codes and other
  33. //    single byte functions
  34. #define    INSERT_PAGEN     2
  35.  
  36. //    printer and font maximums
  37. #define    MAX_WP_PRINTERS         20
  38. #define    MAX_WP_FONTS            50
  39.  
  40. //    text attributes
  41. #define  DM_EXTRALARGE      0
  42. #define  DM_VERYLARGE       1
  43. #define  DM_LARGE           2
  44. #define  DM_SMALL           3
  45. #define  DM_FINE            4
  46. #define  DM_SUPERSCRIPT     5
  47. #define  DM_SUBSCRIPT       6
  48. #define  DM_OUTLINE         7
  49. #define  DM_ITALIC          8
  50. #define  DM_SHADOW          9
  51. #define  DM_REDLINE         10
  52. #define  DM_DOUBLEUND       11
  53. #define  DM_BOLD            12
  54. #define  DM_STRIKEOUT       13
  55. #define  DM_UNDERLINE       14
  56. #define  DM_SMALLCAPS       15
  57.  
  58. struct    printer
  59.         {
  60.         int    status;    // 0xffff not used 0x00 selected 0x01 default printer
  61.         unsigned char    LongName[37];
  62.         unsigned char    PRSName[13];
  63.         unsigned char    Descriptor[27];
  64.         unsigned int    MinTM;
  65.         unsigned int    MinBM;
  66.         unsigned int    MinLM;
  67.         unsigned int    MinRM;
  68.         unsigned char    flags;
  69.         unsigned int    PRSDate;
  70.         unsigned int    PRSTime;
  71.         char    fpath[80];
  72.         };
  73.  
  74. struct    fonts
  75.         {
  76.         int    status;    // 0xffff not used 0x00 selected 0x01 default printer
  77.         char    name[40];
  78.         };
  79.  
  80.  
  81. int   wpopen(char *ptr );                        // open document using
  82.                                                             // appropriate printer
  83. int      wpadd( unsigned char *ptr );                            // add text to document
  84. void     wpclose( void );                                // close document
  85. void     wphrtn( int count);                            // add n hard returns
  86. void     wpindent( int count );                        // add n indents
  87. void     wpcntr(void);                                    // center line
  88. void     wptab(int count);                                // add n tabs
  89. int      wpatton( unsigned char  att_type );        // set attribute on
  90. int      wpattoff( unsigned char  att_type );    // set attribute off
  91. void     wphpage( void );                                // insert hard page break
  92. void     wpdate( char *ptr );                                // insert system date
  93. int      wppagen( unsigned char  np );                    // insert page number
  94. void     wphline(int hpf, int xpos, int ypos, int line_width,
  95.                     int line_height, int shading);    //    draw horizontal line
  96. void     wpvline(int hpf, int xpos, int ypos, int line_width,
  97.                     int line_height, int shading);    //    draw vertical line
  98. void     wplrmarg( int newlmarg, int newrmarg );    // left and right margins
  99. void     wptbmarg( int newtmarg, int newbmarg );    // top and bottom margins
  100.  
  101. // header and footer start
  102. int     wphfstrt( char hf_type, char oe_page );    
  103.  
  104. // header and footer end
  105. int      wphfend(void);                                        
  106.  
  107. // insert graphic
  108. void   wpfig(char *fname, int alignment, int x_pos, 
  109.                 int y_pos, int width, int height);    
  110.  
  111. // justification
  112. void     wpjust( unsigned char just);                    
  113.  
  114. // columns on
  115. void     wpclmon( void );                                    
  116.  
  117. // columns off
  118. void     wpclmoff( void );                                    
  119.  
  120. void    wpsettab( int *tab );
  121.  
  122. // change font
  123. int    wpfont( int f_nmb );
  124.  
  125.  
  126. // set orientation
  127. void    wporient( int orient );                            
  128.  
  129. //    convert document s_ptr to    ascii text file d_ptr
  130. int    wpascii( char *s_ptr, char *d_ptr );
  131.  
  132. //    insert control code
  133. //    see control codes and sbf codes above
  134. int    wpccodes( int code );
  135.  
  136.  
  137.  
  138.  
  139.  
  140.